3.894 \(\int \frac {x^2}{a-b x^2+c x^4} \, dx\)

Optimal. Leaf size=150 \[ \frac {\sqrt {b-\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}-\frac {\sqrt {\sqrt {b^2-4 a c}+b} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {\sqrt {b^2-4 a c}+b}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}} \]

[Out]

1/2*arctanh(x*2^(1/2)*c^(1/2)/(b-(-4*a*c+b^2)^(1/2))^(1/2))*(b-(-4*a*c+b^2)^(1/2))^(1/2)*2^(1/2)/c^(1/2)/(-4*a
*c+b^2)^(1/2)-1/2*arctanh(x*2^(1/2)*c^(1/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2))*(b+(-4*a*c+b^2)^(1/2))^(1/2)*2^(1/2)
/c^(1/2)/(-4*a*c+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {1130, 208} \[ \frac {\sqrt {b-\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}-\frac {\sqrt {\sqrt {b^2-4 a c}+b} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {\sqrt {b^2-4 a c}+b}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Int[x^2/(a - b*x^2 + c*x^4),x]

[Out]

(Sqrt[b - Sqrt[b^2 - 4*a*c]]*ArcTanh[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b
^2 - 4*a*c]) - (Sqrt[b + Sqrt[b^2 - 4*a*c]]*ArcTanh[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]
*Sqrt[c]*Sqrt[b^2 - 4*a*c])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 1130

Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2*(b/q + 1))/2, Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2*(b/q - 1))/2, Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]

Rubi steps

\begin {align*} \int \frac {x^2}{a-b x^2+c x^4} \, dx &=-\left (\frac {1}{2} \left (-1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{-\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^2} \, dx\right )+\frac {1}{2} \left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{-\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^2} \, dx\\ &=\frac {\sqrt {b-\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}-\frac {\sqrt {b+\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 137, normalized size = 0.91 \[ \frac {\sqrt {\sqrt {b^2-4 a c}-b} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {\sqrt {b^2-4 a c}-b}}\right )-\sqrt {-\sqrt {b^2-4 a c}-b} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {-\sqrt {b^2-4 a c}-b}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2/(a - b*x^2 + c*x^4),x]

[Out]

(-(Sqrt[-b - Sqrt[b^2 - 4*a*c]]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[-b - Sqrt[b^2 - 4*a*c]]]) + Sqrt[-b + Sqrt[b^2
 - 4*a*c]]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[-b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b^2 - 4*a*c])

________________________________________________________________________________________

fricas [B]  time = 0.81, size = 551, normalized size = 3.67 \[ -\frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (-\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (-\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(c*x^4-b*x^2+a),x, algorithm="fricas")

[Out]

-1/2*sqrt(1/2)*sqrt((b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(sqrt(1/2)*(b^2*c -
4*a*c^2)*sqrt((b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) + x)
+ 1/2*sqrt(1/2)*sqrt((b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(-sqrt(1/2)*(b^2*c
- 4*a*c^2)*sqrt((b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) + x
) + 1/2*sqrt(1/2)*sqrt((b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(sqrt(1/2)*(b^2*c
 - 4*a*c^2)*sqrt((b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) +
x) - 1/2*sqrt(1/2)*sqrt((b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(-sqrt(1/2)*(b^2
*c - 4*a*c^2)*sqrt((b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3)
+ x)

________________________________________________________________________________________

giac [B]  time = 1.06, size = 513, normalized size = 3.42 \[ \frac {{\left (2 \, b^{2} c^{2} - 8 \, a c^{3} - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c - \sqrt {b^{2} - 4 \, a c} c} b^{2} + 4 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c - \sqrt {b^{2} - 4 \, a c} c} a c - 2 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c - \sqrt {b^{2} - 4 \, a c} c} b c - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c - \sqrt {b^{2} - 4 \, a c} c} c^{2} - 2 \, {\left (b^{2} - 4 \, a c\right )} c^{2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {-\frac {b + \sqrt {b^{2} - 4 \, a c}}{c}}}\right )}{2 \, {\left (b^{4} - 8 \, a b^{2} c + 2 \, b^{3} c + 16 \, a^{2} c^{2} - 8 \, a b c^{2} + b^{2} c^{2} - 4 \, a c^{3}\right )} {\left | c \right |}} - \frac {{\left (2 \, b^{2} c^{2} - 8 \, a c^{3} - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c + \sqrt {b^{2} - 4 \, a c} c} b^{2} + 4 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c + \sqrt {b^{2} - 4 \, a c} c} a c - 2 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c + \sqrt {b^{2} - 4 \, a c} c} b c - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c + \sqrt {b^{2} - 4 \, a c} c} c^{2} - 2 \, {\left (b^{2} - 4 \, a c\right )} c^{2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {-\frac {b - \sqrt {b^{2} - 4 \, a c}}{c}}}\right )}{2 \, {\left (b^{4} - 8 \, a b^{2} c + 2 \, b^{3} c + 16 \, a^{2} c^{2} - 8 \, a b c^{2} + b^{2} c^{2} - 4 \, a c^{3}\right )} {\left | c \right |}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(c*x^4-b*x^2+a),x, algorithm="giac")

[Out]

1/2*(2*b^2*c^2 - 8*a*c^3 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c - sqrt(b^2 - 4*a*c)*c)*b^2 + 4*sqrt(2)*sqrt(b^2
 - 4*a*c)*sqrt(-b*c - sqrt(b^2 - 4*a*c)*c)*a*c - 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c - sqrt(b^2 - 4*a*c)*c)*
b*c - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c - sqrt(b^2 - 4*a*c)*c)*c^2 - 2*(b^2 - 4*a*c)*c^2)*arctan(2*sqrt(1/2)
*x/sqrt(-(b + sqrt(b^2 - 4*a*c))/c))/((b^4 - 8*a*b^2*c + 2*b^3*c + 16*a^2*c^2 - 8*a*b*c^2 + b^2*c^2 - 4*a*c^3)
*abs(c)) - 1/2*(2*b^2*c^2 - 8*a*c^3 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c + sqrt(b^2 - 4*a*c)*c)*b^2 + 4*sqrt(
2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c + sqrt(b^2 - 4*a*c)*c)*a*c - 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c + sqrt(b^2 -
 4*a*c)*c)*b*c - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c + sqrt(b^2 - 4*a*c)*c)*c^2 - 2*(b^2 - 4*a*c)*c^2)*arctan(
2*sqrt(1/2)*x/sqrt(-(b - sqrt(b^2 - 4*a*c))/c))/((b^4 - 8*a*b^2*c + 2*b^3*c + 16*a^2*c^2 - 8*a*b*c^2 + b^2*c^2
 - 4*a*c^3)*abs(c))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 208, normalized size = 1.39 \[ -\frac {\sqrt {2}\, b \arctanh \left (\frac {\sqrt {2}\, c x}{\sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 \sqrt {-4 a c +b^{2}}\, \sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}-\frac {\sqrt {2}\, b \arctan \left (\frac {\sqrt {2}\, c x}{\sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 \sqrt {-4 a c +b^{2}}\, \sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}-\frac {\sqrt {2}\, \arctanh \left (\frac {\sqrt {2}\, c x}{\sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 \sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}+\frac {\sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, c x}{\sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 \sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/(c*x^4-b*x^2+a),x)

[Out]

-1/2*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*c*x)-1/2/(-4*a*
c+b^2)^(1/2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*c*x)*b+
1/2*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*c*x)-1/2/(-4*a*
c+b^2)^(1/2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*c*x)*b

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^{2}}{c x^{4} - b x^{2} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(c*x^4-b*x^2+a),x, algorithm="maxima")

[Out]

integrate(x^2/(c*x^4 - b*x^2 + a), x)

________________________________________________________________________________________

mupad [B]  time = 4.54, size = 416, normalized size = 2.77 \[ -2\,\mathrm {atanh}\left (\frac {\left (x\,\left (4\,a\,c^2-2\,b^2\,c\right )+\frac {x\,\left (8\,b^3\,c^2-32\,a\,b\,c^3\right )\,\left (b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c\right )}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}\right )\,\sqrt {\frac {b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}}{a\,c}\right )\,\sqrt {\frac {b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}-2\,\mathrm {atanh}\left (\frac {\left (x\,\left (4\,a\,c^2-2\,b^2\,c\right )-\frac {x\,\left (8\,b^3\,c^2-32\,a\,b\,c^3\right )\,\left (\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c\right )}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}\right )\,\sqrt {-\frac {\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}}{a\,c}\right )\,\sqrt {-\frac {\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/(a - b*x^2 + c*x^4),x)

[Out]

- 2*atanh(((x*(4*a*c^2 - 2*b^2*c) + (x*(8*b^3*c^2 - 32*a*b*c^3)*(b^3 + (-(4*a*c - b^2)^3)^(1/2) - 4*a*b*c))/(8
*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))*((b^3 + (-(4*a*c - b^2)^3)^(1/2) - 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a
*b^2*c^2)))^(1/2))/(a*c))*((b^3 + (-(4*a*c - b^2)^3)^(1/2) - 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))^
(1/2) - 2*atanh(((x*(4*a*c^2 - 2*b^2*c) - (x*(8*b^3*c^2 - 32*a*b*c^3)*((-(4*a*c - b^2)^3)^(1/2) - b^3 + 4*a*b*
c))/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))*(-((-(4*a*c - b^2)^3)^(1/2) - b^3 + 4*a*b*c)/(8*(b^4*c + 16*a^2*c^
3 - 8*a*b^2*c^2)))^(1/2))/(a*c))*(-((-(4*a*c - b^2)^3)^(1/2) - b^3 + 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2
*c^2)))^(1/2)

________________________________________________________________________________________

sympy [A]  time = 1.25, size = 75, normalized size = 0.50 \[ \operatorname {RootSum} {\left (t^{4} \left (256 a^{2} c^{3} - 128 a b^{2} c^{2} + 16 b^{4} c\right ) + t^{2} \left (16 a b c - 4 b^{3}\right ) + a, \left (t \mapsto t \log {\left (64 t^{3} a c^{2} - 16 t^{3} b^{2} c + 2 t b + x \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/(c*x**4-b*x**2+a),x)

[Out]

RootSum(_t**4*(256*a**2*c**3 - 128*a*b**2*c**2 + 16*b**4*c) + _t**2*(16*a*b*c - 4*b**3) + a, Lambda(_t, _t*log
(64*_t**3*a*c**2 - 16*_t**3*b**2*c + 2*_t*b + x)))

________________________________________________________________________________________